<?php
class Main extends Controller {
	public function __construct() {
		parent::Controller();
		$this->load->helper(array('form','url'));
	}

	public function index() {
		
		$this->load->view('main');
	}
	public function combobox() {
		$q = Doctrine_Query::create() // doctrine
		->select('id')
		->select('username')
		->from('User');

		$users = $q->execute();

		$users = $q->fetchArray();

		foreach ($users as $user) {
			$arr[] = $user;
		}

		echo '{rows:'.json_encode($arr).'}';
	}

}
